// pages/voice_box/fine/index.js
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    data:[],
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    wx.request({
      url: app.url2 + 'api/detail',
      data: {
        openid: wx.getStorageSync('openid'),
        token: wx.getStorageSync('token_md5'),
      },
      header: {},
      success: function(res) {
        var data = res.data;
        that.setData({
          data:data,
        })
              // 伪数据
      // status (0:余额收入，1:余额支出，2:提现状态)  money_num金额  failed提现失败的原因   withdraw是否提现成功(0:提现中，1:提现成功，2:提现失败)
      // var data = [
      //   { status: '0', envelope_type:'0',title: '拆现金红包', time: '2018-02-24 08:24:56', money_num: '10.00', }, 
      //   { status: '0', title: '猜对有钱', time: '2018-02-24 08:24:56', money_num: '10.00', },
      //   { status: '0', title: '语音口令', time: '2018-02-24 08:24:56', money_num: '10.00', },
      //   { status: '1', title: '发出猜对有钱', time: '2018-02-24 08:24:56', money_num: '10.00', },
      //   { status: '1', title: '发出语音口令', time: '2018-02-24 08:24:56', money_num: '10.00', },
      //   { status: '2', title: '提现中', time: '2018-02-24 08:24:56', money_num: '10.00', withdraw: '0', },
      //   { status: '2', title: '提现成功', time: '2018-02-24 08:24:56', money_num: '10.00', withdraw: '1', }, 
      //   { status: '2', title: '提现失败', time: '2018-02-24 08:24:56', money_num: '10.00', failed: '就不给你提现，怎么滴？', withdraw: '2', }, 
      // ];
      }
    })
  }
})